Crate bitcoin_hash

source ·

Structs

  • | Holds configuration for use during | UTXO snapshot load and validation. | The contents here are security critical, | since they dictate which UTXO snapshots | are recognized as valid. |
  • | Implementation of Hash named requirement | for types that internally store a byte | array. This may be used as the hash function | in std::unordered_set or std::unordered_map | over such types. | | Internally, this uses a random instance | of SipHash-2-4. |
  • | A hasher class for Bitcoin’s 160-bit | hash (SHA-256 + RIPEMD-160). |
  • | A hasher class for Bitcoin’s 256-bit | hash (double SHA-256). |
  • | Reads data from an underlying stream, | while hashing the read data. |
  • | A writer stream (for serialization) | that computes a 256-bit hash. |
  • | An outpoint - a combination of a transaction | hash and an index n into its vout |


  • | We’re hashing a nonce into the entries | themselves, so we don’t need extra blinding | in the set hash computation. | | This may exhibit platform endian dependent | behavior but because these are nonced | hashes (random) and this state is only | ever used locally it is safe. | | All that matters is local consistency. |

Constants

Functions

  • | Compute the 256-bit hash of an object. |
  • | Compute the 256-bit hash of the concatenation | of two objects. |
  • | Compute the 160-bit hash an object. |
  • | Compute the 256-bit hash of an object’s | serialization. |
  • | Return a CHashWriter primed for tagged | hashes (as specified in BIP 340). | | The returned object will have SHA256(tag) | written to it twice (= 64 bytes). | | A tagged hash can be computed by feeding | the message into this object, and then | calling CHashWriter::GetSHA256(). |

Type Definitions